package com.yloveg.impl;
import java.util.Date;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yloveg.dao.SUserRoleMapper;
import com.yloveg.entity.SUserRole;
import com.yloveg.entity.SendMsg;
import com.yloveg.service.SUserRoleService;

@Service
public class SUserRoleServiceImpl implements SUserRoleService {
 
    @Autowired
    private SUserRoleMapper sUserRoleMapper;


	@Override
	public int insertSRole(SUserRole sUserRole) {
		// TODO Auto-generated method stub
		sUserRole.setState(1);
		sUserRole.setCreateDate(new Date());
		return sUserRoleMapper.insert(sUserRole);
	}

	@Override
	public int updateByPrimaryKeySelective(SUserRole sUserRole) {
		// TODO Auto-generated method stub
		return sUserRoleMapper.updateByPrimaryKey(sUserRole);
	}

	@Override
	public List<SUserRole> querySRole(SUserRole sUserRole) {
		// TODO Auto-generated method stub
		return sUserRoleMapper.selectByTerm(sUserRole);
	}

	/**
	 * 根据条件删除权限
	 */
	@Override
	public int deleteByTerm(SUserRole sUserRole) {
		// TODO Auto-generated method stub
		return sUserRoleMapper.deleteByTerm(sUserRole);
	}





 
 


}
